/**
 * 
 */
package any.note.server;

import java.util.List;

import any.note.Note;

/**
 * @author keke
 * @reversion $Revision: 34 $
 * @version
 */
public interface NoteService {
    Note createNewNote();

    /**
     * Delete a {@link Note} by specified <code>noteId</code>
     * 
     * @param noteId
     *            note id, must not be <code>null</code>
     * @exception IllegalArgumentException
     *                if <code>noteId</code> is <code>null</code>
     */
    void delete(String noteId);

    /**
     * Get a {@link Note} by specified <code>noteId</code>
     * 
     * @param noteId
     *            note id, must not be <code>null</code>
     * 
     * @exception IllegalArgumentException
     *                if <code>noteId</code> is <code>null</code>
     * @return an instance of {@link Note} identified by specified
     *         <code>noteId</code>, or return <code>null</code> if no such
     *         {@link Note} was found.
     */
    Note getNote(String noteId);

    List<Note> listAll();

    NoteService save(Note entity);

}
